package com.lb.uts.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lb.uts.entity.ActiveScheduling;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 记录当前存活的调度器 Mapper 接口
 * </p>
 *
 * @author cacframe
 * @since 2019-04-26
 */
@Repository
@Mapper
public interface ActiveSchedulingMapper extends BaseMapper<ActiveScheduling> {

    /**
     * 通过ip删除调度器
     *
     * @param ipAndPort
     * @return
     */
    @Delete("delete from active_scheduling where ip = #{ip}")
    int deleteByIp(@Param("ip") String ipAndPort);
}
